@import "~style";

@offset-header: @toolbar-height + @menu-header + @toolbar-opt-height;

.@{prefix}-menu-container {
  &-fold {
    background: @background-color;
    user-select: none;
    width: 100%;
    min-width: @menu-width;
    height: calc(100% - 38px);
    display: flex;
    flex-direction: column;
    &-container {
      flex-grow: 1;
      & > div > div {
        overflow-x: scroll !important;
      }
    }
    &-item {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      position: relative;
      padding: 5px;
      white-space: nowrap;
      height: 31px;
      &-drag {
        display: inline-block;
        background: @background-color;
        position: sticky;
        padding: 5px 6px;
        right: 0;
        top: 0;
        opacity: 0;
        min-width: 25px;
        width: 25px;
        height: 31px;
        cursor: grabbing;
        & > div {
          width: 100%;
          height: 100%;
          display: flex;
          flex-direction: row;
          flex-wrap: wrap;
          & > span {
            display: inline-block;
            width: 3px;
            height: 3px;
            background-color: @font-color;
            margin: 2px 0 0 2px;
            opacity: 0.48;
          }
        }
      }
      &-selected {
        background: @third-primary-color;
        color: @primary-color;
      }
      & > span:first-child {
        i:first-child {
          width: 14px;
          margin-left: 8px;
          font-size: 14px;
        }
        span:first-child {
          width: 14px;
          height: 14px;
          margin-left: 8px;
        }
      }
      &-name {
        margin-left: 10px;
        &-parent {
          font-size: 14px;
          font-weight: bold;
        }
        &-child {
          &[style*='16px'] {
            & > i {
              left: 0;
            }
          }
          position: relative;
          font-size: 12px;
          & > i {
            position: absolute;
            left: -13px;
            top: 3px;
            transform: scale(0.8);
          }
        }
      }
      &-right {
        transition: transform 0.3s;
        &-group {
          display: flex;
          flex-direction: row;
          position: sticky;
          right: 8px;
          align-items: center;
        }
      }
      &-child {
        &-child {
          position: relative;
          white-space: nowrap;
          display: flex;
          flex-direction: row;
          justify-content: space-between;
          align-items: center;
          &:hover {
            .@{prefix}-menu-container-fold-item-drag {
              opacity: 1;
            }
          }
        }
        &-parent {
          display: inline-block;
          min-width: 100%;
          .@{prefix}-menu-container-fold-item {
            .@{prefix}-menu-container-fold-item-right-group > .@{prefix}-menu-container-fold-item-drag {
              //height: 20px;
              //padding: 0 20px;
              //position: absolute;
              background: transparent;
              //top: -3px;
            }
            &:hover {
              .@{prefix}-menu-container-fold-item-right-group > .@{prefix}-menu-container-fold-item-drag {
                opacity: 1;
              }
            }
          }
        }
        &-selected {
          span {
            color: @primary-color;
          }
          background: @third-primary-color;
        }
        &-insert {
          border-bottom: 2px dashed @primary-color !important;
        }
      }
    }
  }
  &-unfold {

  }
}
